package com.ren.service;

import com.ren.bean.OrderDto;
import com.ren.config.FeignClientConfig;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(name = "ryyOrder",configuration = FeignClientConfig.class)
public interface IOrderService {
    @PostMapping("placeOrder")
    public boolean placeOrder(@RequestBody OrderDto orderDto);
    @GetMapping("findOrder/{userCode}")
    public List<OrderDto> findOrder(@PathVariable("userCode")String userCode);
    @GetMapping("saveOrder/{tag}/{orderId}")
    public boolean saveOrder(@PathVariable("tag")int tag,@PathVariable("orderId")int orderId);
}